import { printUnitNum } from './unit';

import { numMap } from './../../utils';

const printUnitList: any = [];

for (let i = 0; i < printUnitNum; i++) {
  const key = i + 1;

  printUnitList.push({
    labelZh: `印刷${numMap[key]}单元`,
    labelEn: `Printing Unit ${key}`,labelRu: `Блок печати ${key}`,
    type: 'input',
    list: [
      {
        inputType: 'read',
        labelZh: '实际值',
        labelEn: 'Actual Value',labelRu: `Фактическое значение`,
        labelTrueZh: null,
        labelTrueEn: null,
        labelFalseZh: null,
        labelFalseEn: null,
        top: null,
        left: null,
        funId: `${key}ColorPhaseLarge`,

        writeVal: null,
        updateClear: false,
        updateSetVal: null,
        updateSetFunId: null,
        updateClearFunId: null,
        defaultValGetFunId: null,
        defaultValGetLocal: false,
        valSetLocal: false,
        defaultVal: 0,
        blurChange: false
      },
      {
        inputType: 'readWrite',
        labelZh: '设置值',
        labelEn: 'Set Value',
        labelTrueZh: null,
        labelTrueEn: null,
        labelFalseZh: null,
        labelFalseEn: null,
        top: null,
        left: null,
        funId: `${key}ColorPhaseAlignment`,

        writeVal: null,
        updateClear: false,
        updateSetVal: null,
        updateSetFunId: null,
        updateClearFunId: null,
        defaultValGetFunId: `${key}ColorPhaseAlignment`,
        defaultValGetLocal: false,
        valSetLocal: false,
        defaultVal: 0,
        blurChange: true
      },
      {
        inputType: 'btnBool',
        labelZh: '确认',
        labelEn: 'Confirm',
        labelTrueZh: '对版中',
        labelTrueEn: '对版中[[en]]',
        labelFalseZh: '对版开始',
        labelFalseEn: '对版开始[[en]]',
        top: null,
        left: null,
        funId: `${key}ColorPhaseAlignmentStart`,

        writeVal: 1,
        updateClear: false,
        updateSetVal: null,
        updateSetFunId: null,
        updateClearFunId: null,
        defaultValGetFunId: `${key}ColorPhaseAlignmentStart`,
        defaultValGetLocal: false,
        valSetLocal: false,
        defaultVal: 0,
        blurChange: false
      }
    ]
  });
}

export default {
  type: 'adjusting',
  labelZh: '相位对版',
  labelEn: '相位对版[[en]]',
  // rutodo
  list: [
    {
      type: 'common',
      labelZh: `印刷单元`,
      labelEn: `Printing Unit`,
      realityLabelZh: '大相位',
      realityLabelEn: 'Large Phase',
      realityLabelRu: 'Большая фаза',
      setupLabelZh: '相位对版值',
      setupLabelEn: 'Phase Plate Matching Value',
      setupLabelRu: 'Значение фазового контраста',
      id: `phaseAlignmentPrintUnit`,
      list: printUnitList
    },
    // ...printUnitList,
    {
      type: 'common',
      labelZh: `开槽单元`,
      labelEn: `Slotting Unit`,
      labelRu: `Блок просечки`,
      realityLabelZh: '大相位',
      realityLabelEn: 'Large Phase',
      realityLabelRu: 'Большая фаза',
      setupLabelZh: '相位对版值',
      setupLabelEn: 'Phase Plate Matching Value',
      setupLabelRu: 'Значение фазового контраста',
      id: `phaseAlignmentSlottedUnit`,
      list: [
        {
          labelZh: '对版值',
          labelEn: 'Plate Matching Value',
          // rutodo
          type: 'input',
          list: [
            {
              inputType: 'read',
              labelZh: '实际值',
              labelEn: 'Actual Value',
              labelRu: `Фактическое значение`,
              labelTrueZh: null,
              labelTrueEn: null,
              labelFalseZh: null,
              labelFalseEn: null,
              top: null,
              left: null,
              funId: `slottedPhaseLarge`,

              writeVal: null,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: null,
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: false
            },
            {
              inputType: 'readWrite',
              labelZh: '设置值',
              labelEn: 'Set Value',
              labelTrueZh: null,
              labelTrueEn: null,
              labelFalseZh: null,
              labelFalseEn: null,
              top: null,
              left: null,
              funId: `slottedPhaseAlignment`,

              writeVal: null,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: `slottedPhaseAlignment`,
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: true
            },
            {
              inputType: 'btnBool',
              labelZh: '确认',
              labelEn: 'Confirm',
              // rutodo
              labelTrueZh: '对版中',
              labelTrueEn: '对版中[[en]]',
              labelFalseZh: '对版开始',
              labelFalseEn: '对版开始[[en]]',
              top: null,
              left: null,
              funId: `slottedPhaseAlignmentStart`,

              writeVal: 1,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: 'slottedPhaseAlignmentStart',
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: false
            }
          ]
        }
      ]
    },
    {
      type: 'common',
      labelZh: `模切单元`,
      labelEn: `Die-cutting Unit`,
      labelRu: `Блок высечки`,
      id: `adjustingDieCuttingUnit`,
      realityLabelZh: '大相位',
      realityLabelEn: 'Large Phase',
      realityLabelRu: 'Большая фаза',
      setupLabelZh: '相位对版值',
      setupLabelEn: 'Phase Plate Matching Value',
      setupLabelRu: 'Значение фазового контраста',
      list: [
        {
          labelZh: '对版值',
          labelEn: 'Plate Matching Value',
          type: 'input',
          list: [
            {
              inputType: 'read',
              labelZh: '实际值',
              labelEn: 'Actual Value',
              labelRu: `Фактическое значение`,
              labelTrueZh: null,
              labelTrueEn: null,
              labelFalseZh: null,
              labelFalseEn: null,
              top: null,
              left: null,
              funId: `dieCuttingPhaseLarge`,

              writeVal: null,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: null,
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: false
            },
            {
              inputType: 'readWrite',
              labelZh: '设置值',
              labelEn: 'Set Value',
              labelTrueZh: null,
              labelTrueEn: null,
              labelFalseZh: null,
              labelFalseEn: null,
              top: null,
              left: null,
              funId: `dieCuttingPhaseAlignment`,

              writeVal: null,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: `dieCuttingPhaseAlignment`,
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: true
            },
            {
              inputType: 'btnBool',
              labelZh: '确认',
              labelEn: 'Confirm',
              labelTrueZh: '对版中',
              labelTrueEn: 'In Plate Matching',
              labelFalseZh: '对版开始',
              labelFalseEn: 'Plate Matching Start',
              top: null,
              left: null,
              funId: `dieCuttingPhaseAlignmentStart`,

              writeVal: 1,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: 'dieCuttingPhaseAlignmentStart',
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: false
            }
          ]
        }
      ]
    },
    {
      type: 'common',
      labelZh: `送纸单元`,
      labelEn: `Feeding Unit`,labelRu: `Блок подачи бумаги`,
      realityLabelZh: '大相位',
      realityLabelEn: 'Large Phase',
      realityLabelRu: 'Большая фаза',
      setupLabelZh: '相位对版值',
      setupLabelEn: 'Phase Plate Matching Value',
      setupLabelRu: 'Значение фазового контраста',
      id: `phaseAlignmentPaperFeedingUnit`,
      list: [
        {
          labelZh: '对版值',
          labelEn: 'Plate Matching Value',
          // rutodo
          type: 'input',
          list: [
            {
              inputType: 'read',
              labelZh: '实际值',
              labelEn: 'Actual Value',
              labelRu: `Фактическое значение`,
              labelTrueZh: null,
              labelTrueEn: null,
              labelFalseZh: null,
              labelFalseEn: null,
              top: null,
              left: null,
              funId: `paperFeedingPhaseLarge`,

              writeVal: null,
              updateClear: false,
              updateSetVal: null,
              updateSetFunId: null,
              updateClearFunId: null,
              defaultValGetFunId: null,
              defaultValGetLocal: false,
              valSetLocal: false,
              defaultVal: 0,
              blurChange: false
            }
          ]
        }
      ]
    }
  ]
};
